<?php 
 $pageTitle = '订单明细';
 $pageId="page-order-detail";
?>

@extends('ios.pageIndex')

@section('page-content')
<div class="content-padded m-order-list m-cart-list">
	<div class="row no-gutter">
		<div class="col-50">订单号：{{$order->id}}</div>
		<div class="col-50">
		@if(!empty($order->express_id))
		{{$order->express_name}}：{{$order->express_id}}
		@endif
		</div>
	</div>
	<div class="content-block-title">送货地址</div>
	<div class="list-block media-list no-padded no-border font-line">
	  <ul id="address-list">
	    <!-- Single chekbox item -->
	    <li>
	      <label class="label-checkbox item-content">
	        <!-- Checked by default -->
	        <div class="item-inner">
	          @if(!empty($order->address))
	          <div class="item-subtitle name">{{$order->address->name}}</div>
	          <div class="item-subtitle address">{{$order->address->province}} {{$order->address->city.$order->address->district.$order->address->street}}</div>
	          <div class="item-subtitle mobile">{{$order->address->mobile}}</div>
	          @else
	          <div class="item-subtitle">该地址已经不存在，可能被您删除了</div>
	          @endif
	        </div>
	      </label>
	    </li>
	  </ul>
	</div>
	
	<div class="content-block-title" style="margin-top: 0;">商品</div>
	<div class="list-block media-list no-padded font-normal">
	  <ul>
	    @foreach($order->products as $p)
	    <li>
	      <div class="item-content border-bottom">
	        <div class="item-media"><img src="{{Images::url($p->product->image,72,72)}}"></div>
	        <div class="item-inner">
	          <div class="item-title-row">
	            <div class="item-title">{{$p->product->enname}}</div>
	          </div>
			  <div class="item-subtitle">{{$p->product->name}}</div>
			  @if (!empty($p->size))
	              <div class="item-subtitle">尺寸：{{$p->size}}</div>
	          @endif
	          @if (!empty($p->color))
	              <div class="item-subtitle">颜色：{{$p->color}}</div>
	          @endif
	          <div class="item-title-row bottom">
	            <div class="item-subtitle">x{{$p->quantity}}</div>
	            <div class="item-after product-fee">{{number_format($p->quantity * $p->price,2)}}</div>
	          </div>
	        </div>
	      </div>
	    </li>
	    @endforeach
	  </ul>
	</div>
	<div class="text-right fee">
		<div>
			小计：¥<span id="products-fee">{{number_format($order->product_total_price,2)}}</span>元</br>
	        运费：¥<span id="postage">{{number_format($order->freight,2)}}</span>元</br>
	总计：¥<span id="total-fee">{{number_format($order->freight + $order->product_total_price,2)}}</span>元</br>
	   </div>
	</div>
</div>
@stop